package com.sikaryofficial.backend.domain.mapping;

import com.sikaryofficial.backend.domain.dto.req.productactivity.ActivityPrizeRelationItem;
import com.sikaryofficial.backend.domain.dto.resp.productactivity.ActivityPrizeRelationDTO;
import com.sikaryofficial.backend.domain.entity.ActivityPrizeRelation;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author : qinjinyuan
 * @desc : 活动映射接口
 * @date : 2023/11/03 9:19
 */
@Mapper
public interface ActivityPrizeRelationMapping {
    ActivityPrizeRelationMapping INSTANCE = Mappers.getMapper(ActivityPrizeRelationMapping.class);

    /**
     * req映射实体
     *
     * @param req
     * @return
     */
    ActivityPrizeRelation coverReqToEntity(ActivityPrizeRelationItem req);

    /**
     * 实体映射dto
     *
     * @param activityPrizeRelation
     * @return
     */
    ActivityPrizeRelationDTO coverToDTO(ActivityPrizeRelation activityPrizeRelation);

    List<ActivityPrizeRelationDTO> coverToDTOs(List<ActivityPrizeRelation> activityPrizeRelations);
}
